<div class="btn-group" style="margin-right: 5px;">
	<a av-event="[click] eventQuery(:node,:event,'shop_goods_state', false)" class="btn btn-default"
		av-class="{'active':( typeof shop_goods_state == 'undefined' )}">全部商品状态</a>
	<a av-event="[click] eventQuery(:node,:event,'shop_goods_state', '3')" class="btn btn-default"
		av-class="{'active':( parseInt(shop_goods_state) == '3' )}">停售编辑中</a>
	<a av-event="[click] eventQuery(:node,:event,'shop_goods_state', '2')" class="btn btn-default"
		av-class="{'active':( parseInt(shop_goods_state) == '2' )}">等待审核</a>
	<a av-event="[click] eventQuery(:node,:event,'shop_goods_state', '1')" class="btn btn-default"
		av-class="{'active':( parseInt(shop_goods_state) == '1' )}">售卖中</a>
	<a av-event="[click] eventQuery(:node,:event,'shop_goods_state', '0')" class="btn btn-default"
		av-class="{'active':( parseInt(shop_goods_state) == '0' )}">审核失败</a>
</div>

<div class="btn-group" style="margin-right: 5px;">
	<a av-event="[click] eventQuery(:node,:event,'state', false)" class="btn btn-default"
		av-class="{'active':( typeof state == 'undefined' )}">全部限时状态</a>
	<a av-event="[click] eventQuery(:node,:event,'state', '2')" class="btn btn-default"
		av-class="{'active':( parseInt(state) == '2' )}">未开始</a>
	<a av-event="[click] eventQuery(:node,:event,'state', '1')" class="btn btn-default"
		av-class="{'active':( parseInt(state) == '1' )}">进行中</a>
	<a av-event="[click] eventQuery(:node,:event,'state', '0')" class="btn btn-default"
		av-class="{'active':( parseInt(state) == '0' )}">已结束</a>
</div>

<a href="#/shop-goodsWhenAdd" class="btn btn-default" style="margin-right: 5px;"><span
		class="glyphicon glyphicon-plus"></span> 添加</a>
<button class="btn btn-default" type="button"  av-event="[click] eventReSort(:node,:event)" style="margin-right: 5px;"><span
		class="glyphicon glyphicon-sort"></span>
	排序</button>
<button class="btn btn-danger" type="button" av-class="{'disabled':submitLock}" av-event="[click] eventRemove(:node,:event)" style="margin-right: 5px;"><span
		class="glyphicon glyphicon-trash"></span>
	删除</button>
<button class="btn btn-default" av-event="[click] eventSearch(:node,:event)" type="button" style="margin-left: 5px;"><span
		class="glyphicon glyphicon-filter"></span> 筛选</button>
<span av-if="checkRouterAnchorQuerySearch()" class="label label-default" style="margin-left: 5px;">存在筛选</span>


<hr />
<table class="table table-striped">
	<thead>
		<tr>
			<th><input type="checkbox"  checkbox="checkbox-all"></th>
			<th>#</th>
			<th><a href="javascript:;" av-event="[click] eventSort(:node,:event,'shop_goods_name_asc', 'shop_goods_name_desc')">
					<span av-if="existSort('shop_goods_name_asc', 'shop_goods_name_desc')" class="glyphicon"
						av-class="{'glyphicon glyphicon-sort-by-attributes':checkSort('shop_goods_name_asc'), 'glyphicon-sort-by-attributes-alt':checkSort('shop_goods_name_desc')}"></span>商品名称
				</a>
			</th>
			<th style="width:6%;">
				<a href="javascript:;" av-event="[click] eventSort(:node,:event,'shop_goods_state_asc', 'shop_goods_state_desc')">
					<span av-if="existSort('shop_goods_state_asc', 'shop_goods_state_desc')" class="glyphicon"
						av-class="{'glyphicon glyphicon-sort-by-attributes':checkSort('shop_goods_state_asc'), 'glyphicon-sort-by-attributes-alt':checkSort('shop_goods_state_desc')}"></span>商品状态
				</a>
			</th>
			<th>
				<a href="javascript:;" av-event="[click] eventSort(:node,:event,'name_asc', 'name_desc')">
					<span av-if="existSort('name_asc', 'name_desc')" class="glyphicon"
						av-class="{'glyphicon glyphicon-sort-by-attributes':checkSort('name_asc'), 'glyphicon-sort-by-attributes-alt':checkSort('name_desc')}"></span>名称
				</a>
			</th>
			<th>描述</th>
			<th style="width:6%;">
				<a href="javascript:;" av-event="[click] eventSort(:node,:event,'state_asc', 'state_desc')">
					<span av-if="existSort('state_asc', 'state_desc')" class="glyphicon"
						av-class="{'glyphicon glyphicon-sort-by-attributes':checkSort('state_asc'), 'glyphicon-sort-by-attributes-alt':checkSort('state_desc')}"></span>限时状态
				</a>
			</th>

			<th>
				<a href="javascript:;" av-event="[click] eventSort(:node,:event,'start_time_asc', 'start_time_desc')">
					<span av-if="existSort('start_time_asc', 'start_time_desc')" class="glyphicon"
						av-class="{'glyphicon glyphicon-sort-by-attributes':checkSort('start_time_asc'), 'glyphicon-sort-by-attributes-alt':checkSort('start_time_desc')}"></span>开始时间
				</a>
			</th>

			<th>
				<a href="javascript:;" av-event="[click] eventSort(:node,:event,'end_time_asc', 'end_time_desc')">
					<span av-if="existSort('end_time_asc', 'end_time_desc')" class="glyphicon"
						av-class="{'glyphicon glyphicon-sort-by-attributes':checkSort('end_time_asc'), 'glyphicon-sort-by-attributes-alt':checkSort('end_time_desc')}"></span>结束时间
				</a>
			</th>

			<th>
				<a href="javascript:;" av-event="[click] eventSort(:node,:event,'sort_asc', 'sort_desc')">
					<span av-if="existSort('sort_asc', 'sort_desc')" class="glyphicon"
						av-class="{'glyphicon glyphicon-sort-by-attributes':checkSort('sort_asc'), 'glyphicon-sort-by-attributes-alt':checkSort('sort_desc')}"></span>排序
				</a>
			</th>
			<th>
				<a href="javascript:;" av-event="[click] eventSort(:node,:event,'update_time_asc', 'update_time_desc')">
					<span av-if="existSort('update_time_asc', 'update_time_desc')" class="glyphicon"
						av-class="{'glyphicon glyphicon-sort-by-attributes':checkSort('update_time_asc'), 'glyphicon-sort-by-attributes-alt':checkSort('update_time_desc')}"></span>更新时间
				</a>
			</th>
			<th>操作</th>
		</tr>
	</thead>
	<tbody>
		<tr av-if="list && list.data && list.data.length" av-for="(value,index)list.data"
			av-event="[dblclick] eventTrDblclick(:node,:event)" av-attr="[data-id] value.shop_goods_id" data-checkbox="checkbox">
			<th><input type="checkbox" checkbox="checkbox" av-attr="[data-id] value.shop_goods_id"></th>
			<td>
				{{parseInt(index)+1+((parseInt(list.page_now) - 1) * list.page_size)}}
			</td>
			<td>
				{{value.shop_goods_name}}
			</td>
			<td>
				<span av-if="value.shop_goods_state==0" class="label label-danger">审核失败</span>
				<span av-elseif="value.shop_goods_state==1" class="label label-success">售卖中</span>
				<span av-elseif="value.shop_goods_state==2" class="label label-warning">等待审核</span>
				<span av-elseif="value.shop_goods_state==3" class="label label-info">停售编辑中</span>
			</td>
			<td>
				{{value.shop_goods_when_name}}
			</td>
			<td>
				<div av-attr="[id] 'tips'+value.shop_goods_when_info" class="tips" data-title="查看分类简介"
					style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;width: 150px;cursor: pointer;"
					av-attr="[data] value.shop_goods_when_info">
					{{value.shop_goods_when_info}}
				</div>
			</td>
			<td>
				<span av-if="value.shop_goods_when_state==0" class="label label-danger">已结束</span>
				<span av-elseif="value.shop_goods_when_state==1" class="label label-success">进行中</span>
				<span av-elseif="value.shop_goods_when_state==2" class="label label-warning">未开始</span>
				<span av-else class="label label-default">未知</span>
			</td>

			<td>
				{{av.date("yyyy-MM-dd HH:mm:ss", parseInt(value.shop_goods_when_start_time) * 1000)}}
			</td>
			<td>
				{{av.date("yyyy-MM-dd HH:mm:ss", parseInt(value.shop_goods_when_end_time) * 1000)}}
			</td>

			<td><input style="width: 80px;" type="text" class="form-control" name="shop_goods_when_sort"
					av-attr="[id] value.shop_goods_id" av-attr="[value] value.shop_goods_when_sort"></td>
			<td>
				{{av.date("yyyy/MM/dd HH:mm EEE", parseInt(value.shop_goods_when_update_time) * 1000)}}
			</td>
			<td>
				<a av-attr="[href] '#/shop-goodsWhenEdit?id='+value.shop_goods_id"
					class="btn btn-default btn-sm"><span class="glyphicon glyphicon-edit"></span>编辑</a>
				<a av-attr="[href] '#/shop-goodsEdit?id='+value.shop_goods_id" class="btn btn-default btn-sm"><span
						class="glyphicon glyphicon-edit"></span>编辑商品</a>
			</td>
		</tr>
		<tr av-else>
			<td colspan="10" align="center">无数据</td>
		</tr>
	</tbody>
</table>


<div av-if="list.data.length" style="text-align: center;">
	<button class="btn btn-default" data-page="1" av-class="{'disabled':isFirstPage(list.page_now)}" type="button"
		style="margin-right: 5px;" av-event="[click] eventPageRequest(:node,:event)">首页</button>
	<button class="btn btn-default" av-attr="[data-page] parseInt(list.page_now) - 1"
		av-class="{'disabled':isFirstPage(list.page_now)}" type="button" style="margin-right: 5px;"
		av-event="[click] eventPageRequest(:node,:event)">上一页</button>
	<button class="btn btn-default" type="button" style="margin-right: 5px;">
		第{{list.page_now}}页
		/ 共{{list.page_count}}页
		/ 有{{list.row_count}}条数据</button>
	<button class="btn btn-default" type="button" av-attr="[data-page] parseInt(list.page_now) + 1"
		av-class="{'disabled':isEndPage(list.page_now, list.page_count)}" style="margin-right: 5px;"
		av-event="[click] eventPageRequest(:node,:event)">下一页</button>
	<button class="btn btn-default" type="button" av-attr="[data-page] list.page_count"
		av-class="{'disabled':isEndPage(list.page_now, list.page_count)}" style="margin-right: 5px;"
		av-event="[click] eventPageRequest(:node,:event)">尾页</button>
</div>
<div class="form-inline" style="text-align: center;margin-top: 10px;">
	<div class="form-group" style="margin-right: 5px;">
		<input type="text" class="form-control" input-page="requestPageRequestValue" placeholder="输入跳转页"
			style="width: 100px;">
	</div>
	<button type="button" class="btn btn-default" av-event="[click]eventPageRequestSubmit(:node,:event)">跳转</button>
</div>


